/**
 * 
 */
package com.eis.persist.model.function;

import java.io.Serializable;

import com.eis.persist.model.base.BasePersist;

/**
 * @author sh-panwei01
 *
 */
public class PersistFunctionType extends BasePersist implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = -3452036795746127362L;
	public static String TYPE_DEFAULT = "Default";
	public static String TYPE_REPORT = "Report";
	
	private int id;
	private String typeName;
	private String displayName;
	private String description;
	
	public PersistFunctionType(){}
	
	public String getName() {
		if (displayName != null && displayName.trim().length() > 0) {
			return displayName;
		} else {
			return typeName;
		}
	}
	
	public PersistFunctionType(int id, String typeName, String displayName, String description){
		this.id = id;
		this.typeName = typeName;
		this.displayName = displayName;
		this.description = description;
	}
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getTypeName() {
		return typeName;
	}
	public void setTypeName(String typeName) {
		this.typeName = typeName;
	}
	public String getDisplayName() {
		return displayName;
	}
	public void setDisplayName(String displayName) {
		this.displayName = displayName;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
}
